/**
 * 
 */
package profile.result;

import java.io.IOException;

import profile.report.DefaultResultsComparator;


/**
 * @author ductrung.tran
 *
 */
public class ResultsAnalyzer {

	private ResultsBuilder resultsBuilder = new ResultsBuilder();
	private ResultsComparator resultsComparator = new DefaultResultsComparator();
	
	public void analyze(String file1, String file2) throws IOException {
		resultsComparator.compare(build(file1), build(file2));
	}
	
	public ProfileResults build(String fileName) throws IOException {
		return resultsBuilder.buildFromFile(fileName);
	}
	
	public static void main(String[] args) throws Exception {
		ResultsAnalyzer analyzer = new ResultsAnalyzer();
		analyzer.analyze(
				"C:/HOMEWARE/Developpement/depot/depot/main/Java/eds/clientTest/target/performance/ProfilingResult-V9.0.1-EDSMain-SPARELTD23.ltai23-1314977588224.txt", 
				"C:/HOMEWARE/Developpement/depot/depot/main/Java/eds/clientTest/target/performance/ProfilingResult-V9.0.1-EDSMain-SPARELTD23.ltai23-1314977734083.txt");
	}
	
}
